<template>
	<div class="test">
		<h1>vue3.0 初体验</h1>
		<p>少年你的头发可还好，？？？？ 哈哈哈哈哈</p>
		{{ num }}

		<button @click="add">add</button>
		<el-alert title="成功提示的文案" type="success"> </el-alert>
	</div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
	name: "Home",
	components: {},
	data() {
		return {
			num: 0
		};
	},
	created() {
		console.log("页面创建完成时的钩子");
	},
	watch: {
		num(val, oldval) {
			console.log(val, "900909");
		}
	},
	methods: {
		add() {
			this.num++;
		}
	}
});
</script>

<style lang="scss" scoped>
.test {
	color: red;
}
</style>